<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="vue.global.js"></script>
</head>
<body>
<div id = 'app'>
    <ul>
    <!--    遍历数组-->
        <li v-for="(item, index) in list">{{item}} , {{index}}</li>
    </ul>
    <!--    遍历数组 对象-->
    <div v-for="(value, index ) in data">{{value.username}},{{value.age}},{{index}}</div>
    <br>

    <!--    遍历对象-->
    <div v-for="(value, key , index ) in data2">{{value}},{{key}},{{index}}</div>

</div>
<script>
    const app = Vue.createApp({
        data() {
            return {
                list:[1,2,3,4],
                data:[{username:'张三', age:18},{username: '李四', age: 19}],
                data2:{username:'张三', age:18}
            }
        },
    });
    let vm = app.mount('#app');

</script>
</body>
</html>